<?php
/*
+--------------------------------------------------------------------------
|   AffiliStore 2
|   ========================================
|   Web: http://www.affilistore.com
|   Email: admin (at) affilistore (dot) com
|	License Type: AffiliStore 2 is NOT open source software and limitations apply 
|   Licence Info: Visit AffiliStore website and click on 'Licence'
+--------------------------------------------------------------------------
*/
// checks to see if password session is set
// if not redirects to ../admin/
if(!$auth->getIdentity()){
	header('Location: ../index.php?case=account&act=login');
}

?>
<h1>ShopNmatch Merchant Control Panel</h1>
<fieldset>
<legend>Welcome <?php echo $auth->getIdentity() ?></legend>

<div class="options">
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="./userpanel.php">Merchant Home</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="userpanel.php?ad=ud">Update Your Details</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="userpanel.php?ad=wd">Change Password</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="userpanel.php?ad=pm">Payment</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="userpanel.php?ad=fd">Manage Product Feeds</a><br />
<img src="images/arrow2.gif" width="9" height="9" alt="" />&nbsp;<a href="userpanel.php?ad=logout">Logout</a>
</div>

<?php if ($_GET['ad'] == 'ld' || $_GET['ad'] == 'ldu' || $_GET['ad'] == 'ldc' || $_GET['ad'] == 'lde') { ?>
<div class="suboptions">
<strong>Links Options</strong><br />
<a href="userpanel.php?ad=ld">Manage Links</a><br />
<a href="userpanel.php?ad=ldu">Update Your Link Details</a><br />
<a href="userpanel.php?ad=ldc">Manage Link Categories</a><br />
<a href="userpanel.php?ad=lde">Edit Email Templates</a><br />
</div>
<?php } ?>

</fieldset>

<?php 
if ($_GET['ad'] == 'ud') {
include('includes/udUserPanel.inc.php');
} else if ($_GET['ad'] == 'wd') {
include('includes/wdUserPanel.inc.php');
} else if ($_GET['ad'] == 'fd') {
include('includes/fdUserPanel.inc.php');
} else if ($_GET['ad'] == 'pm') {
include('includes/pmUserPanel.inc.php');
} else {
include('includes/affiliateUserPanel.inc.php');
}
?>